#!/usr/bin/python
# -*- coding: UTF-8 -*-
# author : bird.zhang@ximalaya.com

import pymysql

import pandas as pd

# select_statement = "SELECT {} FROM {} WHERE {}"
# df = pd.read_sql(select_statement.format("id, uid", "`tb_live_record_all`", "status = 9"), con=conn, index_col='id')

conn = pymysql.connect(host='192.168.1.161', port=3306, user='naliworld', passwd='password!', db='lamia')
df = pd.read_sql('SELECT id, uid FROM `tb_live_record_all` WHERE `status` = 9', con=conn, index_col='id')
df.info()
conn.close()
